import request from '@/utils/request';



export async function pageDev(projectId, params) {
    return request(`/project/${projectId}/devItem/page`, {
        params,
    });
}

export async function save(projectId, data) {
    return request(`/project/${projectId}/devItem`, {
        method: "POST",
        data: data
    });
}

export async function update(projectId, devId, data) {
    return request(`/project/${projectId}/devItem/${devId}`, {
        method: "POST",
        data: data
    });
}

export async function getDetail(projectId, devId) {
    return request(`/project/${projectId}/devItem/${devId}`);
}

export async function deleteDev(projectId, devId) {
    return request(`/project/${projectId}/devItem/${devId}`, {
        method: "DELETE",
    });
}

export async function updateIsArchived(projectId, devId, isArchived) {
    return request(`/project/${projectId}/devItem/${devId}/${isArchived}`, {
        method: "POST",
    });
}